<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/6/13
 * Time: 11:37
 */

namespace app\admin\validate;


use think\Validate;

class ChargeRule extends Validate
{
    protected $rule = [
        'charge_money' => 'require|requireWith:donate_money|gt:donate_money',
        'donate_money' => 'require|requireWith:charge_money',
    ];

    protected $message = [
        'charge_money.require' => '充值金额必须填写',
        'charge_money.requireWith' => '赠送金额必须填写',
        'charge_money.gt' => '充值金额必须大于赠送金额',
        'donate_money.require' => '捐赠金额必须填写',
        'donate_money.requireWith' => '充值金额必须填写',
    ];
}